<%@codepage="65001"%>
<%session.codepage="65001"%>
<!-- #include virtual=/inc/dbConn.asp -->
<!-- #include virtual=/inc/function.asp -->
<!-- #include virtual=/inc/action.header.inc.asp -->

<%
	'## 파라미터 변수 선언부
	processCd	= Request("processCd")
	fullLotNo	= Request("fullLotNo")
	userId		= Request("userId")
	workDt		= Request("workDt")
	working		= Request("working")
	goodQty		= Request("goodQty")
	badQty		= Request("badQty")
	etc			= Request("etc")
	lotSubNo	= Request("lotSubNo")
	execTime	= Request("execTime")

	rank		= Request("rank")
	flag		= Request("flag")

	working	= Replace(working,"'","''")
	etc		= Replace(etc,"'","''")

	If goodQty = "" Then 
		goodQty = 0
	End If 

	If badQty = "" Then 
		badQty = 0
	End If 

	If fullLotNo <> "" Then 
		'divLotNo = Split(fullLotNo,"-")
		lotYear = Left(fullLotNo,2)
		lotNo = Right(fullLotNo,4)
	End If 

	SQLTitle = "-- ■■■■ 단위 공정별로 공정 수행 정보 저장 ■■■■"
	SQL = "exec spSaveOrderResult '" & lotNo & "', '" & lotYear & "', '" & lotSubNo & "', '" & processCd & "', '" & working & "', '" & userId & "', '" & workDt & "', " & goodQty & ", " & badQty & ", '" & etc & "', " & rank & ", '" & flag & "', '" & execTime & "'"

	If xMode="debug" Then 
		Call showDebug(SQLTitle,SQL) 
	End If 

'Response.write SQL
'Response.end
	DbCon.Execute SQL

	Call rsWithXML("Save OK!")
	Response.end
%>